import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from window import Ui_MainWindow
import numpy as np


class MainWidow(QMainWindow, Ui_MainWindow):
    def __init__(self):
        super(MainWidow, self).__init__()
        self.setupUi(self)

        p = self.widget.addPlot(title="Basic array plotting")
        p.setYRange(3, 10)
        p.addLegend()
        data = np.random.normal(size=110) + 5
        c1 = p.plot(data, pen=(0, 255, 0), name="Green curve")
        c2 = p.plot(x=np.array(range(20)) + 40,
                    y=data[40:60],
                    pen=(255, 0, 0),
                    name="red curve")
        # c2.setPos(40, 0)


if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = MainWidow()
    # form.showFullScreen()
    window.show()
    sys.exit(app.exec_())